
'use strict'

const { Json } = require('sequelize/dist/lib/utils')
const { client_max_connections } = require('../config.json')

// 心跳消息
const HEART_MESSAGE = JSON.stringify({
    cmd: 'heart',
    content: {
        "desc": "服务端在线!"
    }
})

// 收到devicePort 回复
const KEY_MESSAGE = JSON.stringify({
    cmd: 'reply',
    content: {
        desc: "收到key信息!"
    }
})

// 不规范请求格式回复
const ERR_MESSAGE = JSON.stringify({
    cmd: 'reply',
    content: {
        desc: "请发送正确的数据格式!"
    }
})

// 连接超出额消息
const CAPCITY_FULL = JSON.stringify({
    cmd: 'reply',
    content: {
        desc: `连接数已超过${client_max_connections}`
    }
})

const ROOMID_REGIST = {
    cmd: 'sync_id',
    content: {
        desc: '房间号',
        sync_id: '',
        project_name
    }
}
module.exports = {
    HEART_MESSAGE,
    PORT_MESSAGE,
    ERR_MESSAGE,
    CAPCITY_FULL,
    ERR_PORT_MESSAGE
}